<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/19
 * Time: 13:00
 */

namespace Goods\Model;

use Think\Model;

/**
 * Class PicModel
 * @package Goods\Model
 * 管理商品图片
 */
class PicModel extends Model
{
    protected $tableName='pic';
    /**
     * 图片添加
     */
   public function add($data){
//     dd($data);die;
       foreach($data['pic'] as $v){
           $data['gid'] =$data['gid'];
           $data['pic'] = $v;
           $res=M('pic')->add($data);
       }
       return $res;
   }
}